module.exports = {
    style: 'simple',
    async fetch({
        page,
        args
    }) {
        page = page || 1
        let resp = await $http.get(`http://i.jandan.net:80/?oxwlxojflwblxbsapi=jandan.get_ooxx_comments&page=${page || ''}`)
        let list = resp.data.comments  
        let items = list.map(photo => {
            return {
                title: photo.type,
                style: "gallery",
                url:photo.pics,
                thumb: photo.pics,
                author: {
                    name: '@'+photo.comment_author
                },
                summary: photo._id,
                route: $route('@image', {
                    url: photo.pics,
                    date:photo.createdAt
                })
            }
        })
        return {
            nextPage: page + 1,
            items: items
        }
    }
}